package cn.ac.zing.api.enums;

import lombok.Getter;
import lombok.AllArgsConstructor;

/**
 * HJ212数据类型的枚举
 */
@Getter
@AllArgsConstructor
public enum DATAEnum {
	REAL("2011", "REAL"),
	DAY("2031", "DAY"),
	HOUR("2061", "HOUR"),
	MIN("2051", "MIN");

	private final String code;
	private final String desc;

	public static DATAEnum getEnumByCode(String code) {
		for (DATAEnum e : DATAEnum.values()) {
			if (e.code.equals(code)) {
				return e;
			}
		}
		return null;
	}
} 